package com.esoon.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

/**
 * @ClassName GetNowTime
 * @Description TODO
 * @Author 2020/9/30 10:22
 * @Version 1.0
 **/
@RestController
@RequestMapping("/v1/Time")
public class Time {

    private static final Logger logger;

    static {
        logger = LoggerFactory.getLogger(Time.class);
    }

    @RequestMapping("/getNowTime")
    public Long getNowTime(){
        logger.info("invoking get now time interface ,the now time = [{}]" , new Date().getTime());
        return new Date().getTime();
    }
}
